﻿//-----------------------------------------------------------------------
// <copyright file="ToolStripLabelControlPage.cs" company="Noboru Project">
//      Copyright (c) Noboru Project. All rights reserved.
//
//      This source code is subject to terms and conditions of the New BSD License (BSD).
//      A copy of the license can be found in the License.html file at the root of this 
//      distribution. If you can not locate the New BSD License (BSD), please send an 
//      email to noboru_adm@live.com.
//      By using this source code in any fashion, you are agreeing to be bound by
//      the terms of the New BSD License (BSD) for Noboru.
//
//      You must not remove this notice, or any other, from this software.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Noboru.Windows.Controls;

namespace Noboru.Demo
{
    public partial class ToolStripLabelControlPage : UserControl
    {
        public ToolStripLabelControlPage()
        {
            this.InitializeComponent();
        }

        private void CheckOnClickValue_Checked(object sender, RoutedEventArgs e)
        {
            this.ToolStripLabel3.CheckOnClick = true;
            this.ToolStripLabel.CheckOnClick = true;
        }

        private void CheckOnClickValue_Unchecked(object sender, RoutedEventArgs e)
        {
            if (this.ToolStripLabel != null)
            {
                this.ToolStripLabel.CheckOnClick = false;
            }

            if (this.ToolStripLabel3 != null)
            {
                this.ToolStripLabel3.CheckOnClick = false;
            }
        }

        private void IsCheckedValue_Checked(object sender, RoutedEventArgs e)
        {
            this.ToolStripLabel3.IsChecked = true;
            this.ToolStripLabel.IsChecked = true;
        }

        private void IsCheckedValue_Unchecked(object sender, RoutedEventArgs e)
        {
            if (this.ToolStripLabel3 != null)
            {
                this.ToolStripLabel3.IsChecked = false;
            }

            if (this.ToolStripLabel != null)
            {
                this.ToolStripLabel.IsChecked = false;
            }
        }

        private void IsEnabledValue_Checked(object sender, RoutedEventArgs e)
        {
            if (this.ToolStripLabel3 != null)
            {
                this.ToolStripLabel3.IsEnabled = true;
            }

            if (this.ToolStripLabel != null)
            {
                this.ToolStripLabel.IsEnabled = true;
            }
        }

        private void IsEnabledValue_Unchecked(object sender, RoutedEventArgs e)
        {
            this.ToolStripLabel3.IsEnabled = false;
            this.ToolStripLabel.IsEnabled = false;
        }

        private void ToolStripLabel3_Click(object sender, RoutedEventArgs e)
        {
            Noboru.Windows.Controls.MessageBox messageBox = new Noboru.Windows.Controls.MessageBox();
            messageBox.Show("Format Painter was clicked", "Demo", MessageBoxButtons.OK);
        }

        private void ToolStripLabel_Click(object sender, RoutedEventArgs e)
        {
            Noboru.Windows.Controls.MessageBox messageBox = new Noboru.Windows.Controls.MessageBox();
            messageBox.Show("Blank Page was clicked", "Demo", MessageBoxButtons.OK);
        }
    }
}
